SRMD safety-related software entities:    BKT 09-Aug-99

AbortAction OF DspActionSequence
1) Fg.forAll[#reset]
2) messageAction.remote.doit ('Program abort.')
Fired by:	EmergAction
		LimitAction

DelayFaultAction OF FaultAction
(Same as FaultAction except the delay on activation.)
(No instances in SRMD.)

EmergAction OF DspActionSequence
1) turn off hydraulics
	vm.gres.genDout.remote.clear[vm.hps1MainHiDO  .bit-1]	
	vm.gres.genDout.remote.clear[vm.hps1MainOnDO  .bit-1]	
	vm.gres.genDout.remote.clear[vm.hps1PilotHiDO .bit-1]	
	vm.gres.genDout.remote.clear[vm.hps1PilotOnDO .bit-1]	
	vm.gres.genDout.remote.clear[vm.hps1SuperOnDO .bit-1]	
	vm.gres.genDout.remote.clear[vm.popMechCloseDO.bit-1]	
	vm.gres.genDout.remote.clear[vm.popMechCloseDO.bit-1]	
	vm.gres.genDout.remote.clear[vm.popAccumDumpDO.bit-1]
2) pull estop chain
	vm.gres.genDout.remote.set[vm.estopChainDO.bit-1]	
3) hold integration
	vm.holdAction.remote.doit
4) ramp down span quickly
	vm.abortAction.remote.doit
5) generate message
	messageAction.remote.doit ('@Emergency hydraulics shutdown.')
Fired by:	EstopAction
		FaultAction
		IntlkAction
		LimitAction

FaultAction OF WarnAction OF DigInpAction OF DspActionSequence
1) vm.emergAction.remote.doit
2) messageAction.remote.doit
Instances:	hps1GenFaultDI ('@HPS overtemp or low level oil.')
Activated by:	MainPanel method superOn
		(DOESN'T SEEM RIGHT-WHAT IF SUPERCHARGER NOT ON?)
Deactivated by:	MainPanel method superOff
		VirtualMachine method download

HoldAction OF DspActionSequence
1) PiServo.collect.remote.hold
2) PidServo.collect.remote.hold
Fired by:	EmergAction
		HydOffAction
		HydOnAction
		MainPanel method hydraulicsOff
		MainPanel method hydraulicsOn
		MainPanel method hydraulicsLo
		MainPanel method run (when running)
		VirtualMachine method download

HydOffAction OF DspActionSequence
1) vm.holdAction.remote.doit
2) vm.stopAction.remote.doit
3) messageAction.remote.doit ('Hydraulics off.')
Installs itself into hps1MainOnDI of gres genDinp.
Activated by:	download process
Deactivated by:	(never deactivated)
Fired by:	hps1MainOnDI (falling edge)

HydOnAction OF DspActionSequence
1) vm.holdAction.remote.doit
2) vm.mspan.remote.clear
3) messageAction.remote.doit ('Hydraulics on.')
Installs itself into hps1MainOnDI of gres genDinp.
Activated by:	download process
Deactivated by:	(never deactivated)
Fired by:	hps1MainOnDI (rising edge)

IntlkAction OF DspActionSequence
1) vm.gres.remote.set[vm.gres.interlockBit[1]]
2) vm.emergAction.remote.doit
3) messageAction.remote.doit
   ('@Interlock chain trip due to conditioner limit.')
DOES NOT install itself into sta. 1 intlk bit (bit 0) of gres intDinp.
Installation is done when activated.
Activated by:	MainPanel method superOn
Deactivated by:	MainPanel method superOff
Fired by:	gres station 1 interlock digital input

LimitAction OF DspActionSequence
1) vm.abortAction.remote.doit or vm.emergAction.remote.doit
2) messageAction.remote.doit ('@Limit on XXXX.')
Monitored:	table displacement feedbacks:	long, lat, vert,
						roll, pitch, yaw, tilt
		table force feedback:		z compression
		force balance force feedbacks:	warp, x compression
Activated by:	VirtualMachine method setInterlock[2]
Deactivated by:	VirtualMachine method setInterlock[1]
Fired by:	LimitDet.c

497 Limit Detectors:
Hit the 497 interlock chain, which drives the gres station 1 interlock
digital input, which in turn fires IntlkAction.
Monitored:	all conditioner feedbacks
Activated by:	VirtualMachine method setInterlock[2]
Deactivated by:	VirtualMachine method setInterlock[1]
Fired by:	Conditioner hardware limit detectors

PreviewAction OF DspActionSequence
1) vm.mspan.remote.resume
2) messageAction.remote.doit ('Program preview.')
Fired by:	VirtualMachine method preview

ResetAction OF DspActionSequence
1) PiServo.collect.remote.reset
2) PidServo.collect.remote.reset
Fired by:	MainPanel method hydraulicsOff
		VirtualMachine method download

ResumeAction OF DspActionSequence
1) PiServo.collect.remote.resume
2) PidServo.collect.remote.resume
Fired by:	MainPanel method hydraulicsHi (if stopped)
		MainPanel method checkStop (if stopped and main high pressure)

RunAction OF DspActionSequence
1) vm.runningDO.remote.set[vm.runningDO.bit-1]
   (cleared by MainPanel method checkStop)
2) vm.mspan.remote.resume
3) messageAction.remote.doit ('Program run.')
Fired by:	VirtualMachine method run

StopAction OF DspActionSequence
1) (Don't clear runningDO: done by MainPanel method checkStop.)
2) vm.mspan.remote.hold[1]
3) messageAction.remote.doit ('Program stop.')
Fired by:	HydOffAction
		VirtualMachine method stop

WatchAction OF DspActionSequence
1) gres.genDout.remote.invert[bit-1]
Note:  This is a reset-type action, not a fault-type action.
Fired by:	Watchdog.c
		Watchdog.alt event

Watchdog.alt
Reset by:	VirtualMachine method stop (with waiting specified)
		MySystem method yieldTime, which in turn is called by:
			Model method writeVar
			Model method attach
			Model method download
Started by:	MySystem method download
Stopped by:	MySystem method detach

MainPanel.alt method update:
1) Show hydraulic status:  read & display digital inputs
2) Show interlocks status: read & display:
	estopChainDI OR gres station 1 interlock digital input
3) If hydraulics inconsistency (either main, pilot, or super),
	a) call mainOff, pilotOff, superOff
	b) call estopStatus to find reason
4) Update various digital displays.
5) If run state inconsistency, call:
	self.activateCtls
	runPanelList.forAll[#attach]

MainPanel method estopStatus:
If estopChainDI is false, return NIL. Otherwise, return string
if any of these digital inputs is true:
	hps1EstopDI		'HPS E-stop button'
	estopBtnConsoleDI	'Console E-stop button'
	estopBtnPitWestDI	'West pit E-stop button'
	estopBtnPitEastDI	'East pit E-stop button'
	estopBtnTableDI		'Table E-stop button'
	estopBtnSpareDI		'Spare E-stop button'
	gres station 1 intlk	'Conditioner interlock'
	default			'Unreset interlocks'
Called by:	method checkOkay, before super/pilot/main on
		method update

MainPanel method update and method setRun (in preview or run) call:
	self.activateCtls
	runPanelList.forAll[#attach]
	(CAN PROBABLY PUT THE SECOND STATEMENT IN THE FIRST METHOD)
